const { db, query } = require("../../db/db");
const util = require("util");
const moment = require("moment");

async function GetUserSignInfo(req, res) {
  let UserId = Number(req.params.username);

  const Select_user = util.format(
    "Select BuCardNum,\
    KeepSignDay,\
    AddSignDay,\
    OreNum from User Where UserId=%s",
    UserId
  );

  const Select_user_res = await query(Select_user);
  res.send({
    status: 0,
    UserSignInfo: Select_user_res[0],
  });
}

module.exports = { GetUserSignInfo };
